package cn.sxt.yxl.question.pojo;

import java.util.Date;
import java.util.Iterator;

public class AColumns
{
	private int id;
	private String name;
	private String content;
	private String url;
	private byte flag;
	private byte status;
	private Date createTimel;
	private Date updateTime;
	private Date publicTime;
	
	//提供字符串描述
	private String statusStr;
	private String flagStr;
	
	
	
	public String getStatusStr()
	{
		//从枚举中取值
		AColumnsEnum[] columnsEnums=AColumnsEnum.values();
		for (int i = 0; i < columnsEnums.length; i++)
		{
			AColumnsEnum columnsEnum=columnsEnums[i];
			if(columnsEnum.toString().startsWith("STATUS_")
					&& columnsEnum.getStatus() == this.getStatus())
			{
				this.statusStr=columnsEnum.getName();
			}
		}
		return statusStr;
	}
	
	public String getFlagStr()
	{
		//从枚举中取值
		AColumnsEnum[] columnsEnums=AColumnsEnum.values();
		for (int i = 0; i < columnsEnums.length; i++)
		{
			AColumnsEnum columnsEnum=columnsEnums[i];
			if(columnsEnum.toString().startsWith("FLAG_")
					&& columnsEnum.getStatus() == this.getStatus())
			{
				this.flagStr=columnsEnum.getName();
			}
		}
		return flagStr;
	}
	public int getId()
	{
		return id;
	}
	public void setId(int id)
	{
		this.id = id;
	}
	public String getName()
	{
		return name;
	}
	public void setName(String name)
	{
		this.name = name;
	}
	public String getContent()
	{
		return content;
	}
	public void setContent(String content)
	{
		this.content = content;
	}
	public String getUrl()
	{
		return url;
	}
	public void setUrl(String url)
	{
		this.url = url;
	}
	public byte getFlag()
	{
		return flag;
	}
	public void setFlag(byte flag)
	{
		this.flag = flag;
	}
	public byte getStatus()
	{
		return status;
	}
	public void setStatus(byte status)
	{
		this.status = status;
	}
	public Date getCreateTimel()
	{
		return createTimel;
	}
	public void setCreateTimel(Date createTimel)
	{
		this.createTimel = createTimel;
	}
	public Date getUpdateTime()
	{
		return updateTime;
	}
	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}
	public Date getPublicTime()
	{
		return publicTime;
	}
	public void setPublicTime(Date publicTime)
	{
		this.publicTime = publicTime;
	}
	
	
	
}
